<html>
<head><meta charset="utf-8"><title>Deprecating llvm_asm · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html">Deprecating llvm_asm</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225095518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225095518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225095518">(Feb 03 2021 at 22:54)</a>:</h4>
<p>I think <code>asm!</code> has been around long enough at this point that we should deprecate <code>llvm_asm!</code> and encourage people to transition over.</p>



<a name="225095841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225095841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225095841">(Feb 03 2021 at 22:57)</a>:</h4>
<p>The main issue is that not all architecture are supported by the new <code>asm!</code>.</p>



<a name="225097906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225097906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225097906">(Feb 03 2021 at 23:19)</a>:</h4>
<p>Would it be possible for us to deprecate <code>llvm_asm!</code> only on architectures where <code>asm!</code> exists?</p>



<a name="225097931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225097931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225097931">(Feb 03 2021 at 23:19)</a>:</h4>
<p>That would cause <em>most</em> people using <code>llvm_asm!</code> to notice and transition over.</p>



<a name="225098042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098042">(Feb 03 2021 at 23:20)</a>:</h4>
<p>We also should put out a call for help implementing <code>asm!</code> on architectures people care about where <code>llvm_asm!</code> currently works but <code>asm!</code> doesn't.</p>



<a name="225098147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098147">(Feb 03 2021 at 23:21)</a>:</h4>
<p>I think the deprecation notice should go out on all architectures, to motivate people to help on porting <code>asm!</code>.</p>



<a name="225098158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098158">(Feb 03 2021 at 23:21)</a>:</h4>
<p>Perhaps we can have a different deprecation message depending on the architecture.</p>



<a name="225098194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098194">(Feb 03 2021 at 23:22)</a>:</h4>
<p>I'd be comfortable deprecating llvm_asm on x86_64 and other architectures we have good support for.</p>



<a name="225098215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098215">(Feb 03 2021 at 23:22)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> Sorry, to clarify...yeah, that's part of it, I'd like to have a different message on architectures where <code>asm!</code> doesn't work yet.</p>



<a name="225098238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098238">(Feb 03 2021 at 23:22)</a>:</h4>
<p>I'd also feel more comfortable <em>removing</em> <code>llvm_asm!</code> on architectures where <code>asm!</code> exists, on a different schedule than doing so for architectures where it doesn't.</p>



<a name="225098282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098282">(Feb 03 2021 at 23:23)</a>:</h4>
<p>I wouldn't object to removing <code>llvm_asm!</code> for architectures that support <code>asm!</code> a few releases after we stabilize <code>asm!</code>.</p>



<a name="225098324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098324">(Feb 03 2021 at 23:23)</a>:</h4>
<p>having unactionable deprecations is pretty bad, but on the other hand I don't think many people out there have inline assembly for architectures that aren't x86_64 or arm anyway.</p>



<a name="225098389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098389">(Feb 03 2021 at 23:24)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> I wouldn't be at all surprised if quite a few embedded targets are using it.</p>



<a name="225098462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098462">(Feb 03 2021 at 23:25)</a>:</h4>
<p>right, but the rust embedded ecosystem doesn't really exist outside of arm and maybe riscv AFAIK.</p>



<a name="225098496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098496">(Feb 03 2021 at 23:25)</a>:</h4>
<p>I've seen some code in the wild using <code>llvm_asm!</code> on MIPS.</p>



<a name="225098511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098511">(Feb 03 2021 at 23:25)</a>:</h4>
<p>I think some CS course in china.</p>



<a name="225098512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098512">(Feb 03 2021 at 23:25)</a>:</h4>
<p>There's been a ton of effort put by some people into msp430, though.</p>



<a name="225098667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098667">(Feb 03 2021 at 23:27)</a>:</h4>
<p>And AVR too.</p>



<a name="225098962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098962">(Feb 03 2021 at 23:30)</a>:</h4>
<p>And there's a €400 bounty for PowerPC support.</p>



<a name="225098968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225098968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225098968">(Feb 03 2021 at 23:30)</a>:</h4>
<p><a href="https://bugs.libre-soc.org/show_bug.cgi?id=451">https://bugs.libre-soc.org/show_bug.cgi?id=451</a></p>



<a name="225099043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099043">(Feb 03 2021 at 23:31)</a>:</h4>
<p>How difficult would it be to rank how frequently <code>llvm_asm</code> appear for various architectures so that it would be easier to inform development priorities?</p>



<a name="225099149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099149">(Feb 03 2021 at 23:32)</a>:</h4>
<p>Throw out a deprecation warning and count the number of complaints?</p>



<a name="225099197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099197">(Feb 03 2021 at 23:33)</a>:</h4>
<p>It's hard given a github project to reliably determine that the code is only meant to compile for a single architecture.</p>



<a name="225099218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099218">(Feb 03 2021 at 23:33)</a>:</h4>
<p>Since I except most users to be small embedded projects.</p>



<a name="225099550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099550">(Feb 03 2021 at 23:37)</a>:</h4>
<p>well, I'm using llvm_asm on powerpc64le-unknown-linux-gnu for testing what actual behaviors a Power9 processor has where the OpenPower spec doesn't specify</p>



<a name="225099637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225099637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225099637">(Feb 03 2021 at 23:38)</a>:</h4>
<p><a href="https://salsa.debian.org/Kazan-team/power-instruction-analyzer">https://salsa.debian.org/Kazan-team/power-instruction-analyzer</a></p>



<a name="225191411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225191411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225191411">(Feb 04 2021 at 17:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="143274">Amanieu</span> <a href="#narrow/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm/near/225098147">said</a>:</p>
<blockquote>
<p>I think the deprecation notice should go out on all architectures, to motivate people to help on porting <code>asm!</code>.</p>
</blockquote>
<p>i think this would just lead many to <code>#![allow(deprecated)]</code> (or whatever the lint is) which seems not great, since to apply to the <code>#![feature]</code> it would need to be at the crate root, no?</p>



<a name="225191633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225191633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225191633">(Feb 04 2021 at 17:16)</a>:</h4>
<p>The feature isn't deprecated, the <code>asm!</code> macro (defined in <code>core/src/macros/mod.rs</code>) is.</p>



<a name="225191667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225191667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225191667">(Feb 04 2021 at 17:16)</a>:</h4>
<p>oh, i see.</p>



<a name="225192052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225192052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225192052">(Feb 04 2021 at 17:19)</a>:</h4>
<p>So you would only need the allow at the usage site. Well, that's not as bad. Still seems a little dodgy to use deprecation as (partially) a way to motivate contributions to the replacement feature though, but i don't feel that strongly about it</p>



<a name="225192262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Deprecating%20llvm_asm/near/225192262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Deprecating.20llvm_asm.html#225192262">(Feb 04 2021 at 17:21)</a>:</h4>
<p>it being deprecated before e.g. ppc is supported might lead people to believe that it's a deliberate choice not to support those architectures tho, so the warning should probably be worded carefully.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>